|
This topic discusses the RTX watchdog timer, programming techniques that you can use to manage starvation conditions, and the effects of starvation on Windows timing.
When a single RTSS thread becomes CPU bound, it is often the result of a program logic error (which occurs most frequently during the development phase). When a thread becomes CPU bound on a single-processor system, Windows freezes. On a multi-processor system, Windows continues to run, but cannot terminate the CPU-bound thread because the lower priority Service Request Interrupt (SRI) manager threads will not run.
By default, the RTX Scheduler is configured to monitor for highly CPU-intensive RTSS applications and notifies the RTX subsystem if Windows has not been allowed to run for a period of time that you specify. You can configure how RTX treats these Windows starvation notifications. When notifications are treated as starvation exceptions, all RTSS applications are stopped or frozen. When the notifications are treated as requests to yield to Windows, the RTX scheduler performs a context switch from RTSS to Windows for the remaining time of the current tick, keeping the entire system “alive” to allow for analysis or debugging. See Windows Starvation and Windows Timing for more information about yielding to Windows.
The timeout value for Windows starvation depends on RTX load, Windows application load, and whether or not your application uses multimedia timers. Set the timeout value on the Starvation tab in RTX Properties.
When monitoring is enabled, the watchdog timer checks on every timer interrupt for continuous running of the same thread and/or RTSS threads to the exclusion of Windows. You can configure RTX to behave in one of two ways when the watchdog timer expires: